using System;
using UnityEngine;

[Serializable]
public class optionsbuttons : MonoBehaviour
{
	public autocalibrateonoff script;

	public AudioClip clip;

	public Texture pressed;

	public Texture unpressed;

	public optionsbuttons other1;

	public optionsbuttons other2;

	public GUITexture gui;

	public bool sound;

	public bool control;

	public bool video;

	public void Update()
	{
		if (UnityEngine.Input.touchCount <= 0)
		{
			return;
		}
		Touch touch = Input.touches[0];
		if (touch.phase == TouchPhase.Began && GetComponent<GUITexture>().HitTest(touch.position))
		{
			AudioSource.PlayClipAtPoint(clip, Camera.main.transform.position);
			gui.texture = pressed;
			if (sound)
			{
				script.showaudio = true;
			}
			if (video)
			{
				script.showvideo = true;
			}
			if (control)
			{
				script.showcontrol = true;
			}
			other1.change();
			other2.change();
		}
	}

	public void change()
	{
		gui.texture = unpressed;
		if (sound)
		{
			script.showaudio = false;
		}
		if (video)
		{
			script.showvideo = false;
		}
		if (control)
		{
			script.showcontrol = false;
		}
	}

	public void Main()
	{
	}
}
